package com.example.szh.splash.model;

import com.example.mvvmcommon.mvvm.model.BaseModel;
import com.example.networkmoudel.ChangeFunction;
import com.example.networkmoudel.HttpFactory;
import com.example.networkmoudel.HttpType;
import com.example.networkmoudel.entity.BaseEntity;
import com.example.szh.splash.data.Api;
import com.example.szh.splash.data.TokenEntity;

import java.util.Map;

import io.reactivex.Observable;

public class SplashModel extends BaseModel {
    public Observable<BaseEntity>requestToken(Map<String,Object>map){
        return HttpFactory.getInstance().factory(HttpType.SIGNTYPE)
                .getRetrofit().create(Api.class).requestToken(cteateBody(map))
                .map(new ChangeFunction<TokenEntity>());
    }
}
